package com.freesky.web.manager.controller;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.freesky.common.dao.entity.*;
import com.freesky.common.pojo.DataTablesResult;
import com.freesky.common.utils.IPInfoUtil;
import com.freesky.common.utils.reponse.JSONResponse;
import com.freesky.common.utils.reponse.JSONResponseDiretor;
import com.freesky.common.vo.SystemProp;
import com.freesky.web.manager.service.SystemService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author Freesky
 */
@Controller
@Slf4j
@Api(description = "系统配置管理")
public class SystemController {

    @Autowired
    private SystemService systemService;





    @ResponseBody
    @RequestMapping(value = "/sys/weekHot", method = RequestMethod.GET)
    @ApiOperation(value = "获取本周热销商品数据")
    public JSONResponse getWeekHot() {
        OrderItem orderItem = systemService.getWeekHot();
        return JSONResponseDiretor.buildSuccessJSONResponse(orderItem);
    }
}
